package com.yimu.ymblog.admin.controller;

import com.yimu.ymblog.common.domain.admin.vo.common.SystemHardwareInfoRspVO;
import com.yimu.ymblog.common.utils.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin")
@Api(tags = "Admin 系统监控模块")
public class AdminSystemController {

    @GetMapping(value = "/systemInfo")
    @ApiOperation(value = "服务器监控", httpMethod = "GET", response = Response.class, notes = "服务器监控")
    public Response systemInfo() {
        SystemHardwareInfoRspVO systemHardwareInfoRspVO = new SystemHardwareInfoRspVO();
        try {
            systemHardwareInfoRspVO.copyTo();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Response.success(systemHardwareInfoRspVO);
    }
}
